<template>
	<div class="check-self-item">
		<van-image :src="statusImg[details?.pczt]" />
		<div class="info">
			<div>
				<p>有无隐患：</p>
				<p>{{ statusEnum[+details?.pczt] || '-' }}</p>
			</div>
			<div>
				<p>自查时间：</p>
				<p>{{ details?.pcsj || '-' }}</p>
			</div>
		</div>
	</div>
</template>

<script setup>
import { defineProps } from 'vue'

defineProps({
	details: {
		type: Object,
		default: () => {}
	}
})

const statusImg = {
	1: require('./../image/trouble_no.png'),
	2: require('./../image/trouble_has.png'),
}
const statusEnum = {
	1: '无隐患',
	2: '有隐患',
}
</script>

<style scoped lang="less">
.check-self-item {
	display: flex;
	align-items: center;
	margin: 16px 32px;
	padding: 24px 32px;
	box-shadow: 0 4px 8px 0 rgba(191, 191, 191, .5);
	border-radius: 12px;
	background: #fff;
	.van-image {
		width: 72px;
		height: 72px;
		margin-right: 8px;
	}
	.info {
		width: 0;
		flex: 1;
		div {
			display: flex;
			&:nth-of-type(1) {
				margin-bottom: 8px;
			}
			p {
				min-height: 40px;
				line-height: 40px;
				&:nth-of-type(2) {
					width: 0;
					flex: 1;
				}
			}
		}
	}
}
</style>
